import React, { Component, PureComponent } from 'react';
import { StyleSheet, Text, View, Button, DeviceEventEmitter } from 'react-native';
import { Ionicons } from '@expo/vector-icons';
import styles from 'src/styles';

class UserInfo extends Component {
  constructor(props) {
    super(props);
    this.state = {
      refreshing: false,
    };
  }

  static navigationOptions = ({navigation}) => ({
    title: navigation.getParam('title'),
  })

  setTitle = () => {
    this.props.navigation.setParams({
      title: new Date().toTimeString(),
    })
  }

  render() {
    return (
      <View style={styles.container}>
        <Text>User Information aa</Text>
        <Button title='Update Title' onPress={this.setTitle} />
        <Ionicons name="md-checkmark-circle" size={32} color="green" />
      </View>
    )
  }
}

export default UserInfo;
